home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / net / readline-2.0mg.tar.gz / readline-2.0mg.tar / readline-2.0mg / configure < prev    next >
Text File  |  1994-08-03  |  37KB  |  1,241 lines

  1. #!/bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf version 1.11 
  4. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  5.  
  6. # This configure script is free software; you can redistribute it and/or
  7. # modify it under the terms of the GNU General Public License as published
  8. # by the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10.  
  11. # This script is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
  14. # Public License for more details.
  15.  
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # Save the original args to write them into config.status later.
  21. configure_args="$*"
  22.  
  23. # Only options that might do something get documented.
  24. ac_usage="Usage: configure [options] [host]
  25. Options: [defaults in brackets after descriptions]
  26. --build=BUILD        configure for building on BUILD [BUILD=HOST]
  27. --disable-FEATURE    do not include FEATURE (same as --enable-FEATURE=no)
  28. --enable-FEATURE[=ARG]    include FEATURE [ARG=yes]
  29. --exec-prefix=PREFIX    install host dependent files in PREFIX [/usr/local]
  30. --help            print this message
  31. --host=HOST        configure for HOST [guessed]
  32. --prefix=PREFIX        install host independent files in PREFIX [/usr/local]
  33. --quiet, --silent    do not print \`checking for...' messages
  34. --srcdir=DIR        find the sources in DIR [configure dir or ..]
  35. --target=TARGET        configure for TARGET [TARGET=HOST]
  36. --verbose        print results of checks
  37. --version        print the version of autoconf that created configure
  38. --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  39. --without-PACKAGE    do not use PACKAGE (same as --with-PACKAGE=no)
  40. --x-includes=DIR    X include files are in DIR
  41. --x-libraries=DIR    X library files are in DIR"
  42.  
  43. # Initialize some variables set by options.
  44. # The variables have the same names as the options, with
  45. # dashes changed to underlines.
  46. build=NONE
  47. exec_prefix=
  48. host=NONE
  49. no_create=
  50. nonopt=NONE
  51. norecursion=
  52. prefix=
  53. program_prefix=
  54. program_suffix=
  55. program_transform_name=
  56. silent=
  57. srcdir=
  58. target=NONE
  59. verbose=
  60. x_includes=
  61. x_libraries=
  62.  
  63. ac_prev=
  64. for ac_option
  65. do
  66.  
  67.   # If the previous option needs an argument, assign it.
  68.   if test -n "$ac_prev"; then
  69.     eval "$ac_prev=\$ac_option"
  70.     ac_prev=
  71.     continue
  72.   fi
  73.  
  74.   # Accept (but ignore some of) the important Cygnus configure
  75.   # options, so we can diagnose typos.
  76.  
  77.   case "$ac_option" in
  78.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  79.   *) ac_optarg= ;;
  80.   esac
  81.  
  82.   case "$ac_option" in
  83.  
  84.   -build | --build | --buil | --bui | --bu | --b)
  85.     ac_prev=build ;;
  86.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  87.     build="$ac_optarg" ;;
  88.  
  89.   -disable-* | --disable-*)
  90.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  91.     # Reject names that aren't valid shell variable names.
  92.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  93.       echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  94.     fi
  95.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  96.     eval "enable_${ac_feature}=no" ;;
  97.  
  98.   -enable-* | --enable-*)
  99.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  100.     # Reject names that aren't valid shell variable names.
  101.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  102.       echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  103.     fi
  104.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  105.     case "$ac_option" in
  106.       *=*) ;;
  107.       *) ac_optarg=yes ;;
  108.     esac
  109.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  110.  
  111.   # For backward compatibility, recognize -exec-prefix and --exec_prefix.
  112.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  113.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  114.   | --exec | --exe | --ex)
  115.     ac_prev=exec_prefix ;;
  116.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  117.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  118.   | --exec=* | --exe=* | --ex=*)
  119.     exec_prefix="$ac_optarg" ;;
  120.  
  121.   -gas | --gas | --ga | --g)
  122.     with_gas=yes ;; # Obsolete; use --with-gas.
  123.  
  124.   -help | --help | --hel | --he)
  125.     cat << EOF
  126. $ac_usage
  127. EOF
  128.     exit 0 ;;
  129.  
  130.   -host | --host | --hos | --ho)
  131.     ac_prev=host ;;
  132.   -host=* | --host=* | --hos=* | --ho=*)
  133.     host="$ac_optarg" ;;
  134.  
  135.   -nfp | --nfp | --nf)
  136.     with_fp=no ;; # Obsolete; use --without-fp.
  137.  
  138.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  139.   | --no-cr | --no-c)
  140.     no_create=yes ;;
  141.  
  142.   -norecursion | --norecursion | --norecursio | --norecursi \
  143.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor)
  144.     norecursion=yes ;;
  145.  
  146.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  147.     ac_prev=prefix ;;
  148.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  149.     prefix="$ac_optarg" ;;
  150.  
  151.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  152.   | --program-pre | --program-pr | --program-p)
  153.     ac_prev=program_prefix ;;
  154.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  155.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  156.     program_prefix="$ac_optarg" ;;
  157.  
  158.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  159.   | --program-suf | --program-su | --program-s)
  160.     ac_prev=program_suffix ;;
  161.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  162.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  163.     program_suffix="$ac_optarg" ;;
  164.  
  165.   -program-transform-name | --program-transform-name \
  166.   | --program-transform-nam | --program-transform-na \
  167.   | --program-transform-n | --program-transform- \
  168.   | --program-transform | --program-transfor \
  169.   | --program-transfo | --program-transf \
  170.   | --program-trans | --program-tran \
  171.   | --progr-tra | --program-tr | --program-t)
  172.     ac_prev=program_transform_name ;;
  173.   -program-transform-name=* | --program-transform-name=* \
  174.   | --program-transform-nam=* | --program-transform-na=* \
  175.   | --program-transform-n=* | --program-transform-=* \
  176.   | --program-transform=* | --program-transfor=* \
  177.   | --program-transfo=* | --program-transf=* \
  178.   | --program-trans=* | --program-tran=* \
  179.   | --progr-tra=* | --program-tr=* | --program-t=*)
  180.     program_transform_name="$ac_optarg" ;;
  181.  
  182.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  183.   | -silent | --silent | --silen | --sile | --sil)
  184.     silent=yes ;;
  185.  
  186.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  187.     ac_prev=srcdir ;;
  188.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  189.     srcdir="$ac_optarg" ;;
  190.  
  191.   -target | --target | --targe | --targ | --tar | --ta | --t)
  192.     ac_prev=target ;;
  193.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  194.     target="$ac_optarg" ;;
  195.  
  196.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  197.     verbose=yes ;;
  198.  
  199.   -version | --version | --versio | --versi | --vers)
  200.     echo "configure generated by autoconf version 1.11"
  201.     exit 0 ;;
  202.  
  203.   -with-* | --with-*)
  204.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  205.     # Reject names that aren't valid shell variable names.
  206.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  207.       echo "configure: $ac_package: invalid package name" >&2; exit 1
  208.     fi
  209.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  210.     case "$ac_option" in
  211.       *=*) ;;
  212.       *) ac_optarg=yes ;;
  213.     esac
  214.     eval "with_${ac_package}='$ac_optarg'" ;;
  215.  
  216.   -without-* | --without-*)
  217.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  218.     # Reject names that aren't valid shell variable names.
  219.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  220.       echo "configure: $ac_package: invalid package name" >&2; exit 1
  221.     fi
  222.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  223.     eval "with_${ac_package}=no" ;;
  224.  
  225.   --x) with_x=yes ;; # Obsolete; use --with-x.
  226.  
  227.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  228.   | --x-incl | --x-inc | --x-in | --x-i)
  229.     ac_prev=x_includes ;;
  230.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  231.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  232.     x_includes="$ac_optarg" ;;
  233.  
  234.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  235.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  236.     ac_prev=x_libraries ;;
  237.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  238.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  239.     x_libraries="$ac_optarg" ;;
  240.  
  241.   -*) echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1
  242.     ;;
  243.  
  244.   *) 
  245.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  246.       echo "configure: warning: $ac_option: invalid host type" >&2
  247.     fi
  248.     if test "x$nonopt" != xNONE; then
  249.       echo "configure: can only configure for one host and one target at a time" >&2; exit 1
  250.     fi
  251.     nonopt="$ac_option"
  252.     ;;
  253.  
  254.   esac
  255. done
  256.  
  257. if test -n "$ac_prev"; then
  258.   echo "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1
  259. fi
  260.  
  261. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  262. trap 'rm -fr confdefs* $ac_clean_files' 0
  263.  
  264. # Save the original args if we used an alternate arg parser.
  265. ac_configure_temp="${configure_args-$*}"
  266. # Strip out --no-create and --norecursion so they don't pile up.
  267. configure_args=
  268. for ac_arg in $ac_configure_temp; do
  269.   case "$ac_arg" in
  270.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  271.   | --no-cr | --no-c) ;;
  272.   -norecursion | --norecursion | --norecursio | --norecursi \
  273.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
  274.   *) configure_args="$configure_args $ac_arg" ;;
  275.   esac
  276. done
  277.  
  278. # NLS nuisances.
  279. # These must not be set unconditionally because not all systems understand
  280. # e.g. LANG=C (notably SCO).
  281. if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
  282. if test "${LANG+set}"   = 'set'; then LANG=C;   export LANG;   fi
  283.  
  284. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  285. rm -rf conftest* confdefs.h
  286. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  287. echo > confdefs.h
  288.  
  289. # A filename unique to this package, relative to the directory that
  290. # configure is in, which we can look for to find out if srcdir is correct.
  291. ac_unique_file=readline.h
  292.  
  293. # Find the source files, if location was not specified.
  294. if test -z "$srcdir"; then
  295.   ac_srcdir_defaulted=yes
  296.   # Try the directory containing this script, then `..'.
  297.   ac_prog=$0
  298.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  299.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  300.   srcdir=$ac_confdir
  301.   if test ! -r $srcdir/$ac_unique_file; then
  302.     srcdir=..
  303.   fi
  304. fi
  305. if test ! -r $srcdir/$ac_unique_file; then
  306.   if test x$ac_srcdir_defaulted = xyes; then
  307.     echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
  308.   else
  309.     echo "configure: can not find sources in ${srcdir}" >&2; exit 1
  310.   fi
  311. fi
  312. ac_ext=c
  313. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  314. ac_cpp='${CPP}'
  315. ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
  316.  
  317.  
  318.  
  319. #!/bin/sh
  320. # From configure.in Configure for Readline 2.0
  321.  
  322.  
  323. # We want these before the checks, so the checks can modify their values.
  324. test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
  325.  
  326. if test -z "$CC"; then
  327.   # Extract the first word of `gcc', so it can be a program name with args.
  328.   set ac_dummy gcc; ac_word=$2
  329.   test -n "$silent" || echo "checking for $ac_word"
  330.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  331.   for ac_dir in $PATH; do
  332.     test -z "$ac_dir" && ac_dir=.
  333.     if test -f $ac_dir/$ac_word; then
  334.       CC="gcc"
  335.       break
  336.     fi
  337.   done
  338.   IFS="$ac_save_ifs"
  339. fi
  340. test -z "$CC" && CC="cc"
  341. test -n "$CC" && test -n "$verbose" && echo "    setting CC to $CC"
  342.  
  343. # Find out if we are using GNU C, under whatever name.
  344. cat > conftest.c <<EOF
  345. #ifdef __GNUC__
  346.   yes
  347. #endif
  348. EOF
  349. ${CC-cc} -E conftest.c > conftest.out 2>&1
  350. if egrep yes conftest.out >/dev/null 2>&1; then
  351.   GCC=1 # For later tests.
  352. fi
  353. rm -f conftest*
  354.  
  355.  
  356. # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
  357. test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
  358.  
  359.  
  360. test -n "$silent" || echo "checking how to run the C preprocessor"
  361. if test -z "$CPP"; then
  362.   # This must be in double quotes, not single quotes, because CPP may get
  363.   # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  364.   # make.  It must be expanded now.
  365.   CPP="${CC-cc} -E"
  366.   cat > conftest.${ac_ext} <<EOF
  367. #include "confdefs.h"
  368. #include <stdio.h>
  369. Syntax Error
  370. EOF
  371. # Some shells (Coherent) do redirections in the wrong order, so need
  372. # the parens.
  373. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  374. if test -z "$ac_err"; then
  375.   :
  376. else
  377.   rm -rf conftest*
  378.   CPP="${CC-cc} -E -traditional-cpp"
  379.   cat > conftest.${ac_ext} <<EOF
  380. #include "confdefs.h"
  381. #include <stdio.h>
  382. Syntax Error
  383. EOF
  384. # Some shells (Coherent) do redirections in the wrong order, so need
  385. # the parens.
  386. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  387. if test -z "$ac_err"; then
  388.   :
  389. else
  390.   rm -rf conftest*
  391.   CPP=/lib/cpp
  392. fi
  393. rm -f conftest*
  394. fi
  395. rm -f conftest*
  396. fi
  397. test -n "$verbose" && echo "    setting CPP to $CPP"
  398.  
  399. if test -n "$GCC"; then
  400.   test -n "$silent" || echo "checking whether -traditional is needed"
  401.   ac_pattern="Autoconf.*'x'"
  402.   ac_prog='#include <sgtty.h>
  403. Autoconf TIOCGETP'
  404.   cat > conftest.${ac_ext} <<EOF
  405. #include "confdefs.h"
  406. $ac_prog
  407. EOF
  408. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  409. if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
  410.   rm -rf conftest*
  411.   ac_need_trad=1
  412.  
  413. fi
  414. rm -f conftest*
  415.  
  416.  
  417.   if test -z "$ac_need_trad"; then
  418.     ac_prog='#include <termio.h>
  419. Autoconf TCGETA'
  420.     cat > conftest.${ac_ext} <<EOF
  421. #include "confdefs.h"
  422. $ac_prog
  423. EOF
  424. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  425. if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
  426.   rm -rf conftest*
  427.   ac_need_trad=1
  428.  
  429. fi
  430. rm -f conftest*
  431.  
  432.   fi
  433.   test -n "$ac_need_trad" && CC="$CC -traditional"
  434. fi
  435.  
  436. # Make sure to not get the incompatible SysV /etc/install and
  437. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  438. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  439. # or the AFS install, which mishandles nonexistent args, or
  440. # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  441. # `staff', or /sbin/install on IRIX which has incompatible command-line
  442. # syntax.  Sigh.
  443. #
  444. #     On most BSDish systems install is in /usr/bin, not /usr/ucb
  445. #     anyway.
  446. # This turns out not to be true, so the mere pathname isn't an indication
  447. # of whether the program works.  What we really need is a set of tests for
  448. # the install program to see if it actually works in all the required ways.
  449. #
  450. # Avoid using ./install, which might have been erroneously created
  451. # by make from ./install.sh.
  452. if test -z "${INSTALL}"; then
  453.   test -n "$silent" || echo "checking for a BSD compatible install"
  454.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  455.   for ac_dir in $PATH; do
  456.     case "$ac_dir" in
  457.     ''|.|/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  458.     *)
  459.       # OSF1 and SCO ODT 3.0 have their own names for install.
  460.       for ac_prog in installbsd scoinst install; do
  461.         if test -f $ac_dir/$ac_prog; then
  462.       if test $ac_prog = install &&
  463.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  464.         # AIX install.  It has an incompatible calling convention.
  465.         # OSF/1 installbsd also uses dspmsg, but is usable.
  466.         :
  467.       else
  468.         INSTALL="$ac_dir/$ac_prog -c"
  469.         break 2
  470.       fi
  471.     fi
  472.       done
  473.       ;;
  474.     esac
  475.   done
  476.   IFS="$ac_save_ifs"
  477. fi
  478.  
  479. if test -z "$INSTALL"; then
  480.   # As a last resort, use the slow shell script.
  481.   for ac_dir in ${srcdir} ${srcdir}/.. ${srcdir}/../..; do
  482.     if test -f $ac_dir/install.sh; then
  483.       INSTALL="$ac_dir/install.sh -c"; break
  484.     fi
  485.   done
  486. fi
  487. if test -z "$INSTALL"; then
  488.   echo "configure: can not find install.sh in ${srcdir} or ${srcdir}/.. or ${srcdir}/../.." >&2; exit 1
  489. fi
  490. test -n "$verbose" && echo "    setting INSTALL to $INSTALL"
  491.  
  492. # Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}.
  493. # It thinks the first close brace ends the variable substitution.
  494. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  495. test -n "$verbose" && echo "    setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
  496.  
  497. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  498. test -n "$verbose" && echo "    setting INSTALL_DATA to $INSTALL_DATA"
  499.  
  500. if test -z "$RANLIB"; then
  501.   # Extract the first word of `ranlib', so it can be a program name with args.
  502.   set ac_dummy ranlib; ac_word=$2
  503.   test -n "$silent" || echo "checking for $ac_word"
  504.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  505.   for ac_dir in $PATH; do
  506.     test -z "$ac_dir" && ac_dir=.
  507.     if test -f $ac_dir/$ac_word; then
  508.       RANLIB="ranlib"
  509.       break
  510.     fi
  511.   done
  512.   IFS="$ac_save_ifs"
  513. fi
  514. test -z "$RANLIB" && RANLIB=":"
  515. test -n "$RANLIB" && test -n "$verbose" && echo "    setting RANLIB to $RANLIB"
  516.  
  517.  
  518. test -n "$silent" || echo "checking for BSD string and memory functions"
  519. cat > conftest.${ac_ext} <<EOF
  520. #include "confdefs.h"
  521. #include <strings.h>
  522. int main() { return 0; }
  523. int t() { rindex(0, 0); bzero(0, 0);; return 0; }
  524. EOF
  525. if eval $ac_compile; then
  526.   :
  527. else
  528.   rm -rf conftest*
  529.   
  530. {
  531. test -n "$verbose" && \
  532. echo "    defining USG"
  533. echo "#define" USG "1" >> confdefs.h
  534. DEFS="$DEFS -DUSG=1"
  535. ac_sed_defs="${ac_sed_defs}\${ac_dA}USG\${ac_dB}USG\${ac_dC}1\${ac_dD}
  536. \${ac_uA}USG\${ac_uB}USG\${ac_uC}1\${ac_uD}
  537. \${ac_eA}USG\${ac_eB}USG\${ac_eC}1\${ac_eD}
  538. "
  539. }
  540.  
  541. fi
  542. rm -f conftest*
  543.  
  544.  
  545. for ac_func in strcasecmp sighold
  546. do
  547. ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  548. test -n "$silent" || echo "checking for ${ac_func}"
  549. cat > conftest.${ac_ext} <<EOF
  550. #include "confdefs.h"
  551. #include <ctype.h>
  552. int main() { return 0; }
  553. int t() { 
  554. /* The GNU C library defines this for functions which it implements
  555.     to always fail with ENOSYS.  Some functions are actually named
  556.     something starting with __ and the normal name is an alias.  */
  557. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  558. choke me
  559. #else
  560. /* Override any gcc2 internal prototype to avoid an error.  */
  561. extern char ${ac_func}(); ${ac_func}();
  562. #endif
  563. ; return 0; }
  564. EOF
  565. if eval $ac_compile; then
  566.   rm -rf conftest*
  567.   {
  568. test -n "$verbose" && \
  569. echo "    defining ${ac_tr_func}"
  570. echo "#define" ${ac_tr_func} "1" >> confdefs.h
  571. DEFS="$DEFS -D${ac_tr_func}=1"
  572. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
  573. \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
  574. \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
  575. "
  576. }
  577.  
  578.  
  579. fi
  580. rm -f conftest*
  581. done
  582.  
  583.  
  584. for ac_hdr in unistd.h stdlib.h varargs.h string.h alloca.h \
  585.         dirent.h sys/ptem.h sys/pte.h sys/stream.h termcap.h \
  586.         termio.h
  587. do
  588. ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  589. test -n "$silent" || echo "checking for ${ac_hdr}"
  590. cat > conftest.${ac_ext} <<EOF
  591. #include "confdefs.h"
  592. #include <${ac_hdr}>
  593. EOF
  594. # Some shells (Coherent) do redirections in the wrong order, so need
  595. # the parens.
  596. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  597. if test -z "$ac_err"; then
  598.   rm -rf conftest*
  599.   
  600. {
  601. test -n "$verbose" && \
  602. echo "    defining ${ac_tr_hdr}"
  603. echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  604. DEFS="$DEFS -D${ac_tr_hdr}=1"
  605. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  606. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  607. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  608. "
  609. }
  610.  
  611.  
  612. fi
  613. rm -f conftest*
  614. done
  615.  
  616.  
  617. test -n "$silent" || echo "checking for sys/file.h"
  618. cat > conftest.${ac_ext} <<EOF
  619. #include "confdefs.h"
  620. #include <sys/file.h>
  621. EOF
  622. # Some shells (Coherent) do redirections in the wrong order, so need
  623. # the parens.
  624. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  625. if test -z "$ac_err"; then
  626.   :
  627. else
  628.   rm -rf conftest*
  629.   
  630. {
  631. test -n "$verbose" && \
  632. echo "    defining NO_SYS_FILE"
  633. echo "#define" NO_SYS_FILE "1" >> confdefs.h
  634. DEFS="$DEFS -DNO_SYS_FILE=1"
  635. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_SYS_FILE\${ac_dB}NO_SYS_FILE\${ac_dC}1\${ac_dD}
  636. \${ac_uA}NO_SYS_FILE\${ac_uB}NO_SYS_FILE\${ac_uC}1\${ac_uD}
  637. \${ac_eA}NO_SYS_FILE\${ac_eB}NO_SYS_FILE\${ac_eC}1\${ac_eD}
  638. "
  639. }
  640.  
  641. fi
  642. rm -f conftest*
  643.  
  644.  
  645. if test -z "$have_tiocgwinsz"; then
  646. test -n "$silent" || echo "checking for TIOCGWINSZ in sys/ioctl.h"
  647. cat > conftest.${ac_ext} <<EOF
  648. #include "confdefs.h"
  649. #include <sys/types.h>
  650. #include <sys/ioctl.h>
  651. int main() { return 0; }
  652. int t() { int x = TIOCGWINSZ;; return 0; }
  653. EOF
  654. if eval $ac_compile; then
  655.   rm -rf conftest*
  656.   
  657. {
  658. test -n "$verbose" && \
  659. echo "    defining GWINSZ_IN_SYS_IOCTL"
  660. echo "#define" GWINSZ_IN_SYS_IOCTL "1" >> confdefs.h
  661. DEFS="$DEFS -DGWINSZ_IN_SYS_IOCTL=1"
  662. ac_sed_defs="${ac_sed_defs}\${ac_dA}GWINSZ_IN_SYS_IOCTL\${ac_dB}GWINSZ_IN_SYS_IOCTL\${ac_dC}1\${ac_dD}
  663. \${ac_uA}GWINSZ_IN_SYS_IOCTL\${ac_uB}GWINSZ_IN_SYS_IOCTL\${ac_uC}1\${ac_uD}
  664. \${ac_eA}GWINSZ_IN_SYS_IOCTL\${ac_eB}GWINSZ_IN_SYS_IOCTL\${ac_eC}1\${ac_eD}
  665. "
  666. }
  667.  
  668.  
  669. fi
  670. rm -f conftest*
  671.  
  672. fi
  673.  
  674. test -n "$silent" || echo "checking for programs able to redeclare getpw functions"
  675. cat > conftest.${ac_ext} <<EOF
  676. #include "confdefs.h"
  677. #include <sys/types.h>
  678. #include <pwd.h>
  679. extern struct passwd *getpwuid();
  680. int main() { return 0; }
  681. int t() { struct passwd *z; z = getpwuid(0);; return 0; }
  682. EOF
  683. if eval $ac_compile; then
  684.   :
  685. else
  686.   rm -rf conftest*
  687.   
  688. {
  689. test -n "$verbose" && \
  690. echo "    defining HAVE_GETPW_DECLS"
  691. echo "#define" HAVE_GETPW_DECLS "1" >> confdefs.h
  692. DEFS="$DEFS -DHAVE_GETPW_DECLS=1"
  693. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_GETPW_DECLS\${ac_dB}HAVE_GETPW_DECLS\${ac_dC}1\${ac_dD}
  694. \${ac_uA}HAVE_GETPW_DECLS\${ac_uB}HAVE_GETPW_DECLS\${ac_uC}1\${ac_uD}
  695. \${ac_eA}HAVE_GETPW_DECLS\${ac_eB}HAVE_GETPW_DECLS\${ac_eC}1\${ac_eD}
  696. "
  697. }
  698.  
  699. fi
  700. rm -f conftest*
  701.  
  702.  
  703. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  704. # for constant arguments.  Useless!
  705. test -n "$silent" || echo "checking for working alloca.h"
  706. cat > conftest.${ac_ext} <<EOF
  707. #include "confdefs.h"
  708. #include <alloca.h>
  709. int main() { return 0; }
  710. int t() { char *p = alloca(2 * sizeof(int));; return 0; }
  711. EOF
  712. if eval $ac_compile; then
  713.   rm -rf conftest*
  714.   
  715. {
  716. test -n "$verbose" && \
  717. echo "    defining HAVE_ALLOCA_H"
  718. echo "#define" HAVE_ALLOCA_H "1" >> confdefs.h
  719. DEFS="$DEFS -DHAVE_ALLOCA_H=1"
  720. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA_H\${ac_dB}HAVE_ALLOCA_H\${ac_dC}1\${ac_dD}
  721. \${ac_uA}HAVE_ALLOCA_H\${ac_uB}HAVE_ALLOCA_H\${ac_uC}1\${ac_uD}
  722. \${ac_eA}HAVE_ALLOCA_H\${ac_eB}HAVE_ALLOCA_H\${ac_eC}1\${ac_eD}
  723. "
  724. }
  725.  
  726.  
  727. fi
  728. rm -f conftest*
  729.  
  730. ac_decl="#ifdef __GNUC__
  731. #define alloca __builtin_alloca
  732. #else
  733. #if HAVE_ALLOCA_H
  734. #include <alloca.h>
  735. #else
  736. #ifdef _AIX
  737.  #pragma alloca
  738. #else
  739. char *alloca ();
  740. #endif
  741. #endif
  742. #endif
  743. "
  744. test -n "$silent" || echo "checking for alloca"
  745. cat > conftest.${ac_ext} <<EOF
  746. #include "confdefs.h"
  747. $ac_decl
  748. int main() { return 0; }
  749. int t() { char *p = (char *) alloca(1);; return 0; }
  750. EOF
  751. if eval $ac_compile; then
  752.   rm -rf conftest*
  753.   
  754. {
  755. test -n "$verbose" && \
  756. echo "    defining HAVE_ALLOCA"
  757. echo "#define" HAVE_ALLOCA "1" >> confdefs.h
  758. DEFS="$DEFS -DHAVE_ALLOCA=1"
  759. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA\${ac_dB}HAVE_ALLOCA\${ac_dC}1\${ac_dD}
  760. \${ac_uA}HAVE_ALLOCA\${ac_uB}HAVE_ALLOCA\${ac_uC}1\${ac_uD}
  761. \${ac_eA}HAVE_ALLOCA\${ac_eB}HAVE_ALLOCA\${ac_eC}1\${ac_eD}
  762. "
  763. }
  764.  
  765.  
  766. else
  767.   rm -rf conftest*
  768.   ac_alloca_missing=1
  769. cat > conftest.${ac_ext} <<EOF
  770. #include "confdefs.h"
  771.  
  772. #if defined(CRAY) && ! defined(CRAY2)
  773. winnitude
  774. #else
  775. lossage
  776. #endif
  777.  
  778. EOF
  779. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  780. if egrep "winnitude" conftest.out >/dev/null 2>&1; then
  781.   rm -rf conftest*
  782.   test -n "$silent" || echo "checking for _getb67"
  783. cat > conftest.${ac_ext} <<EOF
  784. #include "confdefs.h"
  785. #include <ctype.h>
  786. int main() { return 0; }
  787. int t() { 
  788. /* The GNU C library defines this for functions which it implements
  789.     to always fail with ENOSYS.  Some functions are actually named
  790.     something starting with __ and the normal name is an alias.  */
  791. #if defined (__stub__getb67) || defined (__stub____getb67)
  792. choke me
  793. #else
  794. /* Override any gcc2 internal prototype to avoid an error.  */
  795. extern char _getb67(); _getb67();
  796. #endif
  797. ; return 0; }
  798. EOF
  799. if eval $ac_compile; then
  800.   rm -rf conftest*
  801.   {
  802. test -n "$verbose" && \
  803. echo "    defining" CRAY_STACKSEG_END to be "_getb67"
  804. echo "#define" CRAY_STACKSEG_END "_getb67" >> confdefs.h
  805. DEFS="$DEFS -DCRAY_STACKSEG_END=_getb67"
  806. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}_getb67\${ac_dD}
  807. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}_getb67\${ac_uD}
  808. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}_getb67\${ac_eD}
  809. "
  810. }
  811.  
  812.  
  813. else
  814.   rm -rf conftest*
  815.   test -n "$silent" || echo "checking for GETB67"
  816. cat > conftest.${ac_ext} <<EOF
  817. #include "confdefs.h"
  818. #include <ctype.h>
  819. int main() { return 0; }
  820. int t() { 
  821. /* The GNU C library defines this for functions which it implements
  822.     to always fail with ENOSYS.  Some functions are actually named
  823.     something starting with __ and the normal name is an alias.  */
  824. #if defined (__stub_GETB67) || defined (__stub___GETB67)
  825. choke me
  826. #else
  827. /* Override any gcc2 internal prototype to avoid an error.  */
  828. extern char GETB67(); GETB67();
  829. #endif
  830. ; return 0; }
  831. EOF
  832. if eval $ac_compile; then
  833.   rm -rf conftest*
  834.   {
  835. test -n "$verbose" && \
  836. echo "    defining" CRAY_STACKSEG_END to be "GETB67"
  837. echo "#define" CRAY_STACKSEG_END "GETB67" >> confdefs.h
  838. DEFS="$DEFS -DCRAY_STACKSEG_END=GETB67"
  839. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}GETB67\${ac_dD}
  840. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}GETB67\${ac_uD}
  841. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}GETB67\${ac_eD}
  842. "
  843. }
  844.  
  845.  
  846. else
  847.   rm -rf conftest*
  848.   test -n "$silent" || echo "checking for getb67"
  849. cat > conftest.${ac_ext} <<EOF
  850. #include "confdefs.h"
  851. #include <ctype.h>
  852. int main() { return 0; }
  853. int t() { 
  854. /* The GNU C library defines this for functions which it implements
  855.     to always fail with ENOSYS.  Some functions are actually named
  856.     something starting with __ and the normal name is an alias.  */
  857. #if defined (__stub_getb67) || defined (__stub___getb67)
  858. choke me
  859. #else
  860. /* Override any gcc2 internal prototype to avoid an error.  */
  861. extern char getb67(); getb67();
  862. #endif
  863. ; return 0; }
  864. EOF
  865. if eval $ac_compile; then
  866.   rm -rf conftest*
  867.   {
  868. test -n "$verbose" && \
  869. echo "    defining" CRAY_STACKSEG_END to be "getb67"
  870. echo "#define" CRAY_STACKSEG_END "getb67" >> confdefs.h
  871. DEFS="$DEFS -DCRAY_STACKSEG_END=getb67"
  872. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}getb67\${ac_dD}
  873. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}getb67\${ac_uD}
  874. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}getb67\${ac_eD}
  875. "
  876. }
  877.  
  878.  
  879. fi
  880. rm -f conftest*
  881.  
  882. fi
  883. rm -f conftest*
  884.  
  885. fi
  886. rm -f conftest*
  887.  
  888.  
  889. fi
  890. rm -f conftest*
  891.  
  892.  
  893. fi
  894. rm -f conftest*
  895.  
  896. if test -n "$ac_alloca_missing"; then
  897.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  898.   # that cause trouble.  Some versions do not even contain alloca or
  899.   # contain a buggy version.  If you still want to use their alloca,
  900.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  901.   ALLOCA=alloca.o
  902.   
  903. {
  904. test -n "$verbose" && \
  905. echo "    defining C_ALLOCA"
  906. echo "#define" C_ALLOCA "1" >> confdefs.h
  907. DEFS="$DEFS -DC_ALLOCA=1"
  908. ac_sed_defs="${ac_sed_defs}\${ac_dA}C_ALLOCA\${ac_dB}C_ALLOCA\${ac_dC}1\${ac_dD}
  909. \${ac_uA}C_ALLOCA\${ac_uB}C_ALLOCA\${ac_uC}1\${ac_uD}
  910. \${ac_eA}C_ALLOCA\${ac_eB}C_ALLOCA\${ac_eC}1\${ac_eD}
  911. "
  912. }
  913.  
  914.  
  915.   test -n "$silent" || echo "checking stack direction for C alloca"
  916.   test -n "$silent" || echo "checking whether cross-compiling"
  917. # If we cannot run a trivial program, we must be cross compiling.
  918. cat > conftest.${ac_ext} <<EOF
  919. #include "confdefs.h"
  920. main(){exit(0);}
  921. EOF
  922. eval $ac_compile
  923. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  924.   :
  925. else
  926.   cross_compiling=1
  927. fi
  928. rm -fr conftest*
  929.  
  930. if test -n "$cross_compiling"
  931. then
  932.   
  933. {
  934. test -n "$verbose" && \
  935. echo "    defining" STACK_DIRECTION to be "0"
  936. echo "#define" STACK_DIRECTION "0" >> confdefs.h
  937. DEFS="$DEFS -DSTACK_DIRECTION=0"
  938. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}0\${ac_dD}
  939. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}0\${ac_uD}
  940. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}0\${ac_eD}
  941. "
  942. }
  943.  
  944. else
  945. cat > conftest.${ac_ext} <<EOF
  946. #include "confdefs.h"
  947. find_stack_direction ()
  948. {
  949.   static char *addr = 0;
  950.   auto char dummy;
  951.   if (addr == 0)
  952.     {
  953.       addr = &dummy;
  954.       return find_stack_direction ();
  955.     }
  956.   else
  957.     return (&dummy > addr) ? 1 : -1;
  958. }
  959. main ()
  960. {
  961.   exit (find_stack_direction() < 0);
  962. }
  963. EOF
  964. eval $ac_compile
  965. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  966.   
  967. {
  968. test -n "$verbose" && \
  969. echo "    defining" STACK_DIRECTION to be "1"
  970. echo "#define" STACK_DIRECTION "1" >> confdefs.h
  971. DEFS="$DEFS -DSTACK_DIRECTION=1"
  972. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}1\${ac_dD}
  973. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}1\${ac_uD}
  974. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}1\${ac_eD}
  975. "
  976. }
  977.  
  978.  
  979. else
  980.   
  981. {
  982. test -n "$verbose" && \
  983. echo "    defining" STACK_DIRECTION to be "-1"
  984. echo "#define" STACK_DIRECTION "-1" >> confdefs.h
  985. DEFS="$DEFS -DSTACK_DIRECTION=-1"
  986. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}-1\${ac_dD}
  987. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}-1\${ac_uD}
  988. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}-1\${ac_eD}
  989. "
  990. }
  991.  
  992. fi
  993. fi
  994. rm -fr conftest*
  995. fi
  996.  
  997.  
  998.  
  999. # The preferred way to propogate these variables is regular @ substitutions.
  1000. if test -n "$prefix"; then
  1001.   ac_prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  1002. else
  1003.   prefix=/usr/local
  1004. fi
  1005. if test -n "$exec_prefix"; then
  1006.   ac_prsub="$ac_prsub
  1007. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  1008. else
  1009.   exec_prefix='${prefix}' # Let make expand it.
  1010. fi
  1011.  
  1012. # Any assignment to VPATH causes Sun make to only execute
  1013. # the first set of double-colon rules, so remove it if not needed.
  1014. # If there is a colon in the path, we need to keep it.
  1015. if test "x$srcdir" = x.; then
  1016.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1017. fi
  1018.  
  1019. # Quote sed substitution magic chars in DEFS.
  1020. cat >conftest.def <<EOF
  1021. $DEFS
  1022. EOF
  1023. ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  1024. DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
  1025. rm -f conftest.def
  1026. # Substitute for predefined variables.
  1027.  
  1028. trap 'rm -f config.status; exit 1' 1 2 15
  1029. echo creating config.status
  1030. rm -f config.status
  1031. cat > config.status <<EOF
  1032. #!/bin/sh
  1033. # Generated automatically by configure.
  1034. # Run this file to recreate the current configuration.
  1035. # This directory was configured as follows,
  1036. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1037. #
  1038. # $0 $configure_args
  1039.  
  1040. ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
  1041. for ac_option
  1042. do
  1043.   case "\$ac_option" in
  1044.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1045.     echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
  1046.     exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
  1047.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1048.     echo "config.status generated by autoconf version 1.11"
  1049.     exit 0 ;;
  1050.   -help | --help | --hel | --he | --h)
  1051.     echo "\$ac_cs_usage"; exit 0 ;;
  1052.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1053.   esac
  1054. done
  1055.  
  1056. trap 'rm -fr Makefile config.h conftest*; exit 1' 1 2 15
  1057. CC='$CC'
  1058. CFLAGS='$CFLAGS'
  1059. LDFLAGS='$LDFLAGS'
  1060. CPP='$CPP'
  1061. INSTALL='$INSTALL'
  1062. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  1063. INSTALL_DATA='$INSTALL_DATA'
  1064. RANLIB='$RANLIB'
  1065. ALLOCA='$ALLOCA'
  1066. LIBS='$LIBS'
  1067. srcdir='$srcdir'
  1068. top_srcdir='$top_srcdir'
  1069. prefix='$prefix'
  1070. exec_prefix='$exec_prefix'
  1071. ac_prsub='$ac_prsub'
  1072. ac_vpsub='$ac_vpsub'
  1073. extrasub='$extrasub'
  1074. EOF
  1075. cat >> config.status <<\EOF
  1076.  
  1077. ac_given_srcdir=$srcdir
  1078.  
  1079. CONFIG_FILES=${CONFIG_FILES-"Makefile"}
  1080. for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  1081.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1082.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1083.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1084.     # The file is in a subdirectory.
  1085.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1086.     ac_dir_suffix="/$ac_dir"
  1087.   else
  1088.     ac_dir_suffix=
  1089.   fi
  1090.  
  1091.   # A "../" for each directory in $ac_dir_suffix.
  1092.   ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1093.   case "$ac_given_srcdir" in
  1094.   .)  srcdir=.
  1095.       if test -z "$ac_dir_suffix"; then top_srcdir=.
  1096.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1097.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1098.   *) # Relative path.
  1099.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1100.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1101.   esac
  1102.  
  1103.   echo creating "$ac_file"
  1104.   rm -f "$ac_file"
  1105.   comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
  1106.   case "$ac_file" in
  1107.     *.c | *.h | *.C | *.cc | *.m )  echo "/* $comment_str */" > "$ac_file" ;;
  1108.     * )          echo "# $comment_str"     > "$ac_file" ;;
  1109.   esac
  1110.   sed -e "
  1111. $ac_prsub
  1112. $ac_vpsub
  1113. $extrasub
  1114. s%@CC@%$CC%g
  1115. s%@CFLAGS@%$CFLAGS%g
  1116. s%@LDFLAGS@%$LDFLAGS%g
  1117. s%@CPP@%$CPP%g
  1118. s%@INSTALL@%$INSTALL%g
  1119. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1120. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1121. s%@RANLIB@%$RANLIB%g
  1122. s%@ALLOCA@%$ALLOCA%g
  1123. s%@LIBS@%$LIBS%g
  1124. s%@srcdir@%$srcdir%g
  1125. s%@top_srcdir@%$top_srcdir%g
  1126. s%@prefix@%$prefix%g
  1127. s%@exec_prefix@%$exec_prefix%g
  1128. s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
  1129. fi; done
  1130.  
  1131. # These sed commands are put into ac_sed_defs when defining a macro.
  1132. # They are broken into pieces to make the sed script easier to manage.
  1133. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
  1134. # is the cpp macro being defined and VALUE is the value it is being given.
  1135. # Each defining turns into a single global substitution command.
  1136. # Hopefully no one uses "!" as a variable value.
  1137. # Other candidates for the sed separators, like , and @, do get used.
  1138. #
  1139. # ac_d sets the value in "#define NAME VALUE" lines.
  1140. ac_dA='s!^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1141. ac_dB='\([     ][     ]*\)[^     ]*!\1#\2'
  1142. ac_dC='\3'
  1143. ac_dD='!g'
  1144. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1145. ac_uA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1146. ac_uB='\([     ]\)!\1#\2define\3'
  1147. ac_uC=' '
  1148. ac_uD='\4!g'
  1149. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1150. ac_eA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1151. ac_eB='$!\1#\2define\3'
  1152. ac_eC=' '
  1153. ac_eD='!g'
  1154. rm -f conftest.sed
  1155. EOF
  1156. # Turn off quoting long enough to insert the sed commands.
  1157. rm -f conftest.sh
  1158. cat > conftest.sh <<EOF
  1159. $ac_sed_defs
  1160. EOF
  1161.  
  1162. # Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
  1163. # on the size of here documents.
  1164.  
  1165. # Maximum number of lines to put in a single here document.
  1166. ac_max_sh_lines=9
  1167.  
  1168. while :
  1169. do
  1170.   # wc gives bogus results for an empty file on some AIX systems.
  1171.   ac_lines=`grep -c . conftest.sh`
  1172.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1173.   rm -f conftest.s1 conftest.s2
  1174.   sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -9.
  1175.   sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +10.
  1176.   # Write a limited-size here document to append to conftest.sed.
  1177.   echo 'cat >> conftest.sed <<CONFEOF' >> config.status
  1178.   cat conftest.s1 >> config.status
  1179.   echo 'CONFEOF' >> config.status
  1180.   rm -f conftest.s1 conftest.sh
  1181.   mv conftest.s2 conftest.sh
  1182. done
  1183. rm -f conftest.sh
  1184.  
  1185. # Now back to your regularly scheduled config.status.
  1186. cat >> config.status <<\EOF
  1187. # This sed command replaces #undef's with comments.  This is necessary, for
  1188. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1189. # on some systems where configure will not decide to define it in
  1190. # config.h.
  1191. cat >> conftest.sed <<\CONFEOF
  1192. s,^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
  1193. CONFEOF
  1194. rm -f conftest.h
  1195. # Break up the sed commands because old seds have small limits.
  1196. ac_max_sed_lines=20
  1197.  
  1198. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  1199. for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
  1200.   echo creating $ac_file
  1201.  
  1202.   cp $ac_given_srcdir/$ac_file.in conftest.h1
  1203.   cp conftest.sed conftest.stm
  1204.   while :
  1205.   do
  1206.     ac_lines=`grep -c . conftest.stm`
  1207.     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1208.     rm -f conftest.s1 conftest.s2 conftest.h2
  1209.     sed ${ac_max_sed_lines}q conftest.stm > conftest.s1 # Like head -20.
  1210.     sed 1,${ac_max_sed_lines}d conftest.stm > conftest.s2 # Like tail +21.
  1211.     sed -f conftest.s1 < conftest.h1 > conftest.h2
  1212.     rm -f conftest.s1 conftest.h1 conftest.stm
  1213.     mv conftest.h2 conftest.h1
  1214.     mv conftest.s2 conftest.stm
  1215.   done
  1216.   rm -f conftest.stm conftest.h
  1217.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1218.   cat conftest.h1 >> conftest.h
  1219.   rm -f conftest.h1
  1220.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1221.     # The file exists and we would not be changing it.
  1222.     echo "$ac_file is unchanged"
  1223.     rm -f conftest.h
  1224.   else
  1225.     rm -f $ac_file
  1226.     mv conftest.h $ac_file
  1227.   fi
  1228. fi; done
  1229. rm -f conftest.sed
  1230.  
  1231.  
  1232.  
  1233. # Makefile uses this timestamp file to record whether config.h is up to date.
  1234. touch stamp-config
  1235. exit 0
  1236. EOF
  1237. chmod +x config.status
  1238. # Some shells look in PATH for config.status without the "./".
  1239. test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} ./config.status
  1240.  
  1241.